cmake_minimum_required(VERSION 3.15)

include(proj.conf)

find_package(bouffalo_sdk REQUIRED HINTS $ENV{BL_SDK_BASE})


file(GLOB_RECURSE sources "${CMAKE_CURRENT_SOURCE_DIR}/lvgl_config/*.c"
    "${CMAKE_CURRENT_SOURCE_DIR}/wifi/*.c"
    "${CMAKE_CURRENT_SOURCE_DIR}/ui/*.c"
    "${CMAKE_CURRENT_SOURCE_DIR}/BLE_HID/*.c")

file(GLOB_RECURSE ui "${CMAKE_CURRENT_SOURCE_DIR}/ui/*.c" "${CMAKE_CURRENT_SOURCE_DIR}/ui/generated/*.c" "${CMAKE_CURRENT_SOURCE_DIR}/ui/generated/guider_fonts/*.c" "${CMAKE_CURRENT_SOURCE_DIR}/ui/generated/images/*.c" "${CMAKE_CURRENT_SOURCE_DIR}/ui/custom/*.c")

# User
# sdk_add_compile_definitions(-DCONFIG_CLI_CMD_ENABLE)
# sdk_add_compile_definitions(-DCONFIG_EASYFLASH4)

# sdk_add_compile_definitions(-DBL616_DHCP_DEBUG)
sdk_add_include_directories(main wifi BLE_HID lvgl_config ui ui/generated ui/generated/guider_fonts ui/generated/images ui/custom)

target_sources(app PRIVATE ${sources} ${ui})

sdk_set_main_file(main/main.c)

project(AiPi-BLE-HID)
